<template>
  <div class="profile-page">
    <div class="profile-card">
      <a-avatar :src="user.userAvatar" :size="80" class="avatar" />
      <div class="info">
        <h2>{{ user.userName || '未登录' }}</h2>
        <p class="role">{{ user.userRole || 'guest' }}</p>
        <p class="desc">{{ user.userProfile || '这个人很神秘，什么都没有写~' }}</p>
      </div>
    </div>

    <div class="section">
      <h3>我的作品</h3>
      <p class="placeholder">后续接入作品、收藏、设置等管理模块。</p>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useLoginUserStore } from '@/stores/loginUser'
const store = useLoginUserStore()
const user = store.loginUser
</script>

<style scoped>
.profile-page {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px;
}

.profile-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.avatar {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.info h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
}
.role {
  margin: 0;
  color: #666;
}
.desc {
  margin: 6px 0 0 0;
  color: #888;
}

.section {
  margin-top: 24px;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: 16px;
}
.placeholder {
  color: #9ca3af;
}
</style>


